<!DOCTYPE html>
<html>
  <head>
    <title><%= title %></title>
    <link rel='stylesheet' href='/lib/bootstrap/dist/css/bootstrap.min.css' />
    <link rel='stylesheet' href='/stylesheets/font-awesome.min.css' />
    <link rel='stylesheet' href='/stylesheets/ionicons.min.css' />
    <link rel='stylesheet' href='/lib/admin-lte/dist/css/AdminLTE.min.css' />
    <link rel='stylesheet' href='/lib/admin-lte/dist/css/skins/skin-blue.min.css' />
    <link rel='stylesheet' href='/lib/ckeditor/contents.css?t=HBDF' />
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <style>
      body {
        margin: 0;
      }
    </style>
  </head>
  <body class="hold-transition skin-blue sidebar-mini">
  <div class="wrapper">

    <% include header.ejs %>

    <% include menu.ejs %>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Main content -->
      <section class="content">

        <!-- Your Page Content Here -->
        <div class="box">
          <div class="box-header with-border">
            <h3 class="box-title">
              <%= platStr %>
              <!-- <button class="btn btn-sm btn-success" onclick="toAddplatform(<%= platformType %>)"><span class="glyphicon glyphicon-plus"></span> 添加</button> -->
            </h3>
            <button class="btn btn-sm btn-default pull-right" > 导入数据</button>
            <button class="btn btn-sm btn-info pull-right" > 导出数据</button>
          </div>
          <!-- /.box-header -->
          <div class="box-body">
            <table class="table table-bordered">
              <tr>
                <th style="width: 10px">ID</th>
                <th>平台</th>
                <th>操作</th>
              </tr>
              <tr>
                <td>
                    <%- result[0].platformID %>
                </td>
                <td>
                  <%= platStr %>
                </td>
                <td>
                  <button class="btn btn-xs btn-warning" onclick="toAddplatform(<%= platformType %>)">
                    <span class="glyphicon glyphicon-edit"></span>
                    编辑
                  </button>
                  <button class="btn btn-xs btn-danger" onclick = "deleteplatform(<%= platformType %>)">
                    <span class="glyphicon glyphicon-trash"></span>
                    删除
                  </button>
                </td>
              </tr>
            </table>
            <!-- 文本 -->
            <ul class="products-list product-list-in-box">
              <li class="item">
                <div class="product-info">
                  <a href="javascript:void(0)" class="product-title">详情
                      <span class="product-description">
                        <%- result[0].content %>
                      </span>
                </div>
              </li>
            </ul>
          </div>
          <!-- /.box-body -->
          <div class="box-footer clearfix">
            
          </div>
        </div>
      </section>
      <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <!-- Main Footer -->
    <% include footer.ejs %>


    <!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
  </div>
  <!-- ./wrapper -->
  </body>
  <script src = "/javascripts/jquery.min.js"></script>
  <script src = "/lib/bootstrap/dist/js/bootstrap.min.js"></script>
  <script src = "/javascripts/app.min.js"></script>
  <script>
    // 添加与更改事件
    function toAddplatform(platformType){
        window.location.href = "/platform/addplat?platformType=" + platformType;
    }
    // 删除事件
    function deleteplatform(platformType) {
      window.location.href = "/platform/deleteplatform?platformType=" + platformType;
    }
  </script>

</html>
